//
//  ZYAddStrongCouseCell.m
//  优学荟管理系统
//
//  Created by edz on 2017/10/25.
//  Copyright © 2017年 星道三好. All rights reserved.
//

#import "ZYAddStrongCouseCell.h"
#import "HNCourseListChartsModel.h"
@implementation ZYAddStrongCouseCell



- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self setUpSuperView];
    }
    
    
    return self;
    
    
}


- (void)setAssignByHNCourseListChartsModel:(HNCourseListChartsModel *)model{
    
    
    self.nameLabel.text = [NSString stringWithFormat:@"%@",model.content];
    
    
}



- (void)setUpSuperView{
    
    
    self.nameLabel = [UILabel new];
    self.nameLabel.font = [UIFont systemFontOfSize:14];
    self.nameLabel.textColor = ColorRGB(0, 0, 0);
    [self.contentView addSubview:self.nameLabel];
    
    self.selectButton = [UIButton buttonWithType:(UIButtonTypeCustom)];
    [self.selectButton setImage:[UIImage imageNamed:@"btn_choice_default"] forState:(UIControlStateNormal)];
    [self.selectButton setImage:[UIImage imageNamed:@"icon_choice_seleted"] forState:(UIControlStateSelected)];
    [self.contentView addSubview:self.selectButton];
    
    
    
    
    [self.nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
       
        make.left.offset(10);
        make.top.offset(10);
        make.right.equalTo(self).offset(-100);
        
    }];
    
    [self.selectButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(self).offset(-10);
        make.top.centerY.equalTo(self.nameLabel);
    }];
    
    [self.contentView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.offset(0);
        make.bottom.mas_equalTo(self.selectButton).offset(10);
    }];
    
    
    
    
    
}


















@end
